3.180 \(\int \frac{(d+e x^2) (a+b \log (c x^n))}{x^2} \, dx\)

Optimal. Leaf size=44 \[ -\frac{d \left (a+b \log \left (c x^n\right )\right )}{x}+e x \left (a+b \log \left (c x^n\right )\right )-\frac{b d n}{x}-b e n x \]

[Out]

-((b*d*n)/x) - b*e*n*x - (d*(a + b*Log[c*x^n]))/x + e*x*(a + b*Log[c*x^n])

________________________________________________________________________________________

Rubi [A]  time = 0.0394148, antiderivative size = 37, normalized size of antiderivative = 0.84, number of steps used = 2, number of rules used = 2, integrand size = 21, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.095, Rules used = {14, 2334} \[ -\left (\frac{d}{x}-e x\right ) \left (a+b \log \left (c x^n\right )\right )-\frac{b d n}{x}-b e n x \]

Antiderivative was successfully verified.

[In]

Int[((d + e*x^2)*(a + b*Log[c*x^n]))/x^2,x]

[Out]

-((b*d*n)/x) - b*e*n*x - (d/x - e*x)*(a + b*Log[c*x^n])

Rule 14

Int[(u_)*((c_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*u, x], x] /; FreeQ[{c, m}, x] && SumQ[u]
 &&  !LinearQ[u, x] &&  !MatchQ[u, (a_) + (b_.)*(v_) /; FreeQ[{a, b}, x] && InverseFunctionQ[v]]

Rule 2334

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*(x_)^(m_.)*((d_) + (e_.)*(x_)^(r_.))^(q_.), x_Symbol] :> With[{u = I
ntHide[x^m*(d + e*x^r)^q, x]}, Simp[u*(a + b*Log[c*x^n]), x] - Dist[b*n, Int[SimplifyIntegrand[u/x, x], x], x]
] /; FreeQ[{a, b, c, d, e, n, r}, x] && IGtQ[q, 0] && IntegerQ[m] &&  !(EqQ[q, 1] && EqQ[m, -1])

Rubi steps

\begin{align*} \int \frac{\left (d+e x^2\right ) \left (a+b \log \left (c x^n\right )\right )}{x^2} \, dx &=-\left (\frac{d}{x}-e x\right ) \left (a+b \log \left (c x^n\right )\right )-(b n) \int \left (e-\frac{d}{x^2}\right ) \, dx\\ &=-\frac{b d n}{x}-b e n x-\left (\frac{d}{x}-e x\right ) \left (a+b \log \left (c x^n\right )\right )\\ \end{align*}

Mathematica [A]  time = 0.002001, size = 49, normalized size = 1.11 \[ -\frac{a d}{x}+a e x-\frac{b d \log \left (c x^n\right )}{x}+b e x \log \left (c x^n\right )-\frac{b d n}{x}-b e n x \]

Antiderivative was successfully verified.

[In]

Integrate[((d + e*x^2)*(a + b*Log[c*x^n]))/x^2,x]

[Out]

-((a*d)/x) - (b*d*n)/x + a*e*x - b*e*n*x - (b*d*Log[c*x^n])/x + b*e*x*Log[c*x^n]

________________________________________________________________________________________

Maple [C]  time = 0.214, size = 249, normalized size = 5.7 \begin{align*} -{\frac{b \left ( -e{x}^{2}+d \right ) \ln \left ({x}^{n} \right ) }{x}}-{\frac{-i\pi \,be{x}^{2}{\it csgn} \left ( i{x}^{n} \right ) \left ({\it csgn} \left ( ic{x}^{n} \right ) \right ) ^{2}+i\pi \,be{x}^{2}{\it csgn} \left ( i{x}^{n} \right ){\it csgn} \left ( ic{x}^{n} \right ){\it csgn} \left ( ic \right ) +i\pi \,be{x}^{2} \left ({\it csgn} \left ( ic{x}^{n} \right ) \right ) ^{3}-i\pi \,be{x}^{2} \left ({\it csgn} \left ( ic{x}^{n} \right ) \right ) ^{2}{\it csgn} \left ( ic \right ) +i\pi \,bd{\it csgn} \left ( i{x}^{n} \right ) \left ({\it csgn} \left ( ic{x}^{n} \right ) \right ) ^{2}-i\pi \,bd{\it csgn} \left ( i{x}^{n} \right ){\it csgn} \left ( ic{x}^{n} \right ){\it csgn} \left ( ic \right ) -i\pi \,bd \left ({\it csgn} \left ( ic{x}^{n} \right ) \right ) ^{3}+i\pi \,bd \left ({\it csgn} \left ( ic{x}^{n} \right ) \right ) ^{2}{\it csgn} \left ( ic \right ) -2\,\ln \left ( c \right ) be{x}^{2}+2\,ben{x}^{2}-2\,ae{x}^{2}+2\,\ln \left ( c \right ) bd+2\,bdn+2\,ad}{2\,x}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((e*x^2+d)*(a+b*ln(c*x^n))/x^2,x)

[Out]

-b*(-e*x^2+d)/x*ln(x^n)-1/2*(-I*Pi*b*e*x^2*csgn(I*x^n)*csgn(I*c*x^n)^2+I*Pi*b*e*x^2*csgn(I*x^n)*csgn(I*c*x^n)*
csgn(I*c)+I*Pi*b*e*x^2*csgn(I*c*x^n)^3-I*Pi*b*e*x^2*csgn(I*c*x^n)^2*csgn(I*c)+I*Pi*b*d*csgn(I*x^n)*csgn(I*c*x^
n)^2-I*Pi*b*d*csgn(I*x^n)*csgn(I*c*x^n)*csgn(I*c)-I*Pi*b*d*csgn(I*c*x^n)^3+I*Pi*b*d*csgn(I*c*x^n)^2*csgn(I*c)-
2*ln(c)*b*e*x^2+2*b*e*n*x^2-2*a*e*x^2+2*ln(c)*b*d+2*b*d*n+2*a*d)/x

________________________________________________________________________________________

Maxima [A]  time = 1.1841, size = 66, normalized size = 1.5 \begin{align*} -b e n x + b e x \log \left (c x^{n}\right ) + a e x - \frac{b d n}{x} - \frac{b d \log \left (c x^{n}\right )}{x} - \frac{a d}{x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x^2+d)*(a+b*log(c*x^n))/x^2,x, algorithm="maxima")

[Out]

-b*e*n*x + b*e*x*log(c*x^n) + a*e*x - b*d*n/x - b*d*log(c*x^n)/x - a*d/x

________________________________________________________________________________________

Fricas [A]  time = 1.26111, size = 124, normalized size = 2.82 \begin{align*} -\frac{b d n +{\left (b e n - a e\right )} x^{2} + a d -{\left (b e x^{2} - b d\right )} \log \left (c\right ) -{\left (b e n x^{2} - b d n\right )} \log \left (x\right )}{x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x^2+d)*(a+b*log(c*x^n))/x^2,x, algorithm="fricas")

[Out]

-(b*d*n + (b*e*n - a*e)*x^2 + a*d - (b*e*x^2 - b*d)*log(c) - (b*e*n*x^2 - b*d*n)*log(x))/x

________________________________________________________________________________________

Sympy [A]  time = 1.22656, size = 60, normalized size = 1.36 \begin{align*} - \frac{a d}{x} + a e x - \frac{b d n \log{\left (x \right )}}{x} - \frac{b d n}{x} - \frac{b d \log{\left (c \right )}}{x} + b e n x \log{\left (x \right )} - b e n x + b e x \log{\left (c \right )} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x**2+d)*(a+b*ln(c*x**n))/x**2,x)

[Out]

-a*d/x + a*e*x - b*d*n*log(x)/x - b*d*n/x - b*d*log(c)/x + b*e*n*x*log(x) - b*e*n*x + b*e*x*log(c)

________________________________________________________________________________________

Giac [A]  time = 1.31499, size = 84, normalized size = 1.91 \begin{align*} \frac{b n x^{2} e \log \left (x\right ) - b n x^{2} e + b x^{2} e \log \left (c\right ) + a x^{2} e - b d n \log \left (x\right ) - b d n - b d \log \left (c\right ) - a d}{x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x^2+d)*(a+b*log(c*x^n))/x^2,x, algorithm="giac")

[Out]

(b*n*x^2*e*log(x) - b*n*x^2*e + b*x^2*e*log(c) + a*x^2*e - b*d*n*log(x) - b*d*n - b*d*log(c) - a*d)/x